package com.zy.openchat.core.model.group;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

public class SuperGroupFullInfo implements Parcelable {
    @SerializedName(value = "group_description",alternate = {"description"})
    public String group_description;

    //Number of members in the supergroup or channel; 0 if unknown.
    public int member_count;
    //Number of privileged users in the supergroup or channel; 0 if unknown.
    public int administrator_count;
    //Number of restricted users in the supergroup; 0 if unknown.
    public int restricted_count;
    //Number of users banned from chat; 0 if unknown.
    public int banned_count;
    public String invite_link;
    public String notice;


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.group_description);
        dest.writeInt(this.member_count);
        dest.writeInt(this.administrator_count);
        dest.writeInt(this.restricted_count);
        dest.writeInt(this.banned_count);
        dest.writeString(this.invite_link);
        dest.writeString(this.notice);
    }

    public void readFromParcel(Parcel source) {
        this.group_description = source.readString();
        this.member_count = source.readInt();
        this.administrator_count = source.readInt();
        this.restricted_count = source.readInt();
        this.banned_count = source.readInt();
        this.invite_link = source.readString();
        this.notice = source.readString();
    }

    public SuperGroupFullInfo() {
    }

    protected SuperGroupFullInfo(Parcel in) {
        this.group_description = in.readString();
        this.member_count = in.readInt();
        this.administrator_count = in.readInt();
        this.restricted_count = in.readInt();
        this.banned_count = in.readInt();
        this.invite_link = in.readString();
        this.notice = in.readString();
    }

    public static final Creator<SuperGroupFullInfo> CREATOR = new Creator<SuperGroupFullInfo>() {
        @Override
        public SuperGroupFullInfo createFromParcel(Parcel source) {
            return new SuperGroupFullInfo(source);
        }

        @Override
        public SuperGroupFullInfo[] newArray(int size) {
            return new SuperGroupFullInfo[size];
        }
    };
}
